SALVIA_CHECK_BUILD_WITH_UNICODE()

include ( ../cgllvm_test/tests.cmake )
include ( ../st_combinator_test/tests.cmake )
include ( ../semantic_test/tests.cmake )

INCLUDE_DIRECTORIES(
	${SALVIA_BOOST_HOME_DIR}
	${SALVIA_HOME_DIR}
	${SASL_HOME_DIR}
	${SALVIA_LLVM_INCLUDE_PATH}
)

LINK_DIRECTORIES(
	${SALVIA_BOOST_LIB_DIR}
	${SALVIA_LLVM_LIB_PATH}
)

set( SASL_TEST_PROJECT_DIR regression_test )
set( SASL_TEST_PROJECT_NAME sasl_test_regression )
configure_file(
	${SASL_HOME_DIR}/sasl/test/test_resources/test_main.cpp.in
	${SASL_HOME_DIR}/sasl/test/${SASL_TEST_PROJECT_DIR}/test_main.cpp
	@ONLY
)

set( HEADER_FILES "" )
set( SOURCE_FILES test_main.cpp
	${SASL_CGLLVM_TEST_SOURCES}
	${SASL_ST_COMBINATOR_TEST_SOURCES}
	${SASL_SEMANTIC_TEST_SOURCES}
)

ADD_EXECUTABLE( ${SASL_TEST_PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES} )
TARGET_LINK_LIBRARIES( ${SASL_TEST_PROJECT_NAME}
	EFLIB
	sasl_test_cases
	sasl_semantic sasl_syntaxtree
	sasl_enums sasl_common
	${SASL_CGLLVM_TEST_LIBS}
	${SALVIA_BOOST_LIBS}
)

SALVIA_CONFIG_OUTPUT_PATHS( ${SASL_TEST_PROJECT_NAME} )
SASL_TEST_CREATE_VCPROJ_USERFILE( ${SASL_TEST_PROJECT_NAME} )
